<template>
  <div>
    <!-- 未授权 -->
    <div class="nothing">
      <div class="tips-img">
        <img src="../../assets/icon/i-no-auth.png" alt>
      </div>
      <div class="tips-message">你需要先进行{{ source==="public"?"公众号":"小程序" }}授权后才可以使用该功能</div>
      <el-button type="primary" size="small" round @click="goPublicAuth">立即去授权</el-button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    source: {
      type: String,
      require: true
    }
  },
  data() {
    return {}
  },
  methods: {
    // 跳转去授权页面
    goPublicAuth() {
      this.$router.push({
        name: 'PublicAuth'
      })
    }
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
  // 未授权
  .nothing {
    margin: 50px 0;
    text-align: center;
    .tips-img {
      margin: 0 auto;
      width: 307px;
      height: 278px;
    }
    .tips-message {
      height: 50px;
      line-height: 50px;
      font-size: 16px;
    }
  }
</style>
